package com.lordjoe.collectiveintelligence.svm.matchmaker;

import com.lordjoe.collectiveintelligence.svm.*;

/**
 * com.lordjoe.collectiveintelligence.svm.matchmaker.MatchMakerDataSource
 *
 * @author Steve Lewis
 * @date May 25, 2009
 */
public class MatchMakerDataSource extends SVMDataSource
{
    public static MatchMakerDataSource[] EMPTY_ARRAY = {};
    public static Class THIS_CLASS = MatchMakerDataSource.class;


    private final MatchMaker m_Data;
    public MatchMakerDataSource(DataSetType pType,MatchMaker mm)
    {
        super(pType);
        m_Data = mm;
        PotentialPair[] pairs = mm.getPotentialPairs();
        for (int i = 0; i < pairs.length; i++) {
            PotentialPair pair = pairs[i];
            addDataItem(new PairSVMWrapper(pair));
        }
    }

    public MatchMaker getData()
    {
        return m_Data;
    }
}
